import adminLayout from '@/components/admin/layout.vue';

// 后端路由文件
export default [
    {
        path: '/admin/index',
        redirect: '/admin/login'
    },
    {
        path: '/admin/index/index',
        redirect: '/admin/login'
    },
    {
        path: '/admin/index/login',
        redirect: '/admin/login'
    },
    {
        path: '/admin/login/index',
        redirect: '/admin/login'
    },
    {
        path: '/admin/login',
        name: 'adminlogin',
        component: () => import('@/views/admin/login.vue')
    },
    {
        path: '/admin/',
        component: adminLayout,
        children: [
            {
                path: '',
                redirect: '/admin/login',
            },
            {
                path: 'donation/edit',
                name: 'admin_donation_edit',
                component: () => import('@/views/admin/donation/edit.vue')
            },
            {
                path: 'donation/add',
                name: 'admin_donation_add',
                component: () => import('@/views/admin/donation/add.vue')
            },
            {
                path: 'donation_progress/edit',
                name: 'admin_donation_progress_edit',
                component: () => import('@/views/admin/donation_progress/edit.vue')
            },
            {
                path: 'video/donate_stories_add',
                name: 'admin_video_donate_stories_add',
                component: () => import('@/views/admin/video/donate_stories_add.vue')
            },
            {
                path: 'admin/edit',
                name: 'admin_admin_edit',
                component: () => import('@/views/admin/admin/edit.vue')
            },
            {
                path: 'admin_roles/edit',
                name: 'admin_admin_roles_edit',
                component: () => import('@/views/admin/admin_roles/edit.vue')
            },
            {
                path: 'admin_menu/index',
                name: 'admin_admin_menu_index',
                component: () => import('@/views/admin/admin_menu/index.vue')
            },
            {
                path: 'user/index',
                name: 'admin_user_index',
                component: () => import('@/views/admin/user/index.vue')
            },
        ]
    },
];